<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="./css/index.css">
</head>
<body>
<div id="app">
    <el-table
            :data="tableData"
            style="width: 100%">
        <el-table-column
                prop="date"
                label="日期"
                width="180">
        </el-table-column>
        <el-table-column
                prop="name"
                label="姓名"
                width="180">
        </el-table-column>
        <el-table-column
                prop="address"
                label="地址">
        </el-table-column>
    </el-table>
</div>
</body>
<!-- import Vue before Element -->
<script src="./js/vue.js"></script>
<!-- import JavaScript -->
<script src="./js/index.js"></script>
<script src="./js/jquery-3.1.1.min.js"></script>
<script src="./js/axios.min.js"></script>
<script>

    new Vue({
        el: '#app',
        data: function () {
            return {
                tableData: []
                // tableData: [{
                //     date: '2016-05-02',
                //     name: '王小虎',
                //     address: '上海市普陀区金沙江路 1518 弄'
                // }, {
                //     date: '2016-05-04',
                //     name: '王小虎',
                //     address: '上海市普陀区金沙江路 1517 弄'
                // }, {
                //     date: '2016-05-01',
                //     name: '王小虎',
                //     address: '上海市普陀区金沙江路 1519 弄'
                // }, {
                //     date: '2016-05-03',
                //     name: '王小虎',
                //     address: '上海市普陀区金沙江路 1516 弄'
                // }]
            }
        },
        mounted() {
            this.initTable();
        },
        methods: {
            initTable: function () {
                // const self=this;
                axios.get('/service-hi/data').then(function (res) {
                    this.tableData = res.data;
                    console.info(res);
                }).catch(function (res) {
                    console.log(res);
                });
                // console.log("OK");
                // tableData = $.get('/service-hi/data')
            }
        }
    })

</script>
</html>